package com.tender.dtos;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

@Data
public class ImportShipDataAndShipVisitInfoDTO {

    @Schema(description = "提单号")
    private String billNo;

    // ----------------------------- 船基本信息 ------------- start -------------
    @Schema(description = "中文船名")
    private String shipName;

    @Schema(description = "英文船名")
    private String englishName;

    @Schema(description = "IMO")
    private String shipImo;

    @Schema(description = "总TEU")
    private Integer teuQty;

    @Schema(description = "船公司")
    private String shipLineCode;

    @Schema(description = "船公司-名称")
    private String shipLineName;

    @Schema(description = "MMSI")
    private String shipMmsi;

    @Schema(description = "最大载重吨")
    private BigDecimal shipDeadWeight;

    @Schema(description = "船舶呼号")
    private String shipCall;

    @Schema(description = "船长")
    private BigDecimal shipLength;

    @Schema(description = "船宽")
    private BigDecimal shipWidth;

    @Schema(description = "建造日期")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date buildDate;

    @Schema(description = "船速")
    private BigDecimal shipSpeed;

    @Schema(description = "空载艏吃水")
    private BigDecimal emptyBowDraft;

    @Schema(description = "空载艉吃水")
    private BigDecimal emptySternDraft;

    @Schema(description = "重载艏吃水")
    private BigDecimal fullBowDraft;

    @Schema(description = "重载艉吃水")
    private BigDecimal fullSternDraft;

    @Schema(description = "停靠位置")
    private String berthLocation = "烟台港国际码头";  // TODO 字典 - YTGJ

    // ----------------------------- 船基本信息 ------------- end -------------

    // ----------------------------- 航次信息 ------------- start -------------
    @Schema(description = "预计靠泊时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date etb;

    @Schema(description = "实际靠泊时间 / 实际到港时间 / 船舶靠泊时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date rtb;   // 01

    @Schema(description = "确报到港时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date dta;   // 02

    @Schema(description = "预计到港时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date eta;   // 03

    @Schema(description = "预计离泊时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date etu;

    @Schema(description = "预计离港时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date etd;

    @Schema(description = "卸船开始时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date discBeginTime;

    @Schema(description = "装船开始时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date loadBeginTime;

    @Schema(description = "实际离港时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date rtd;

    @Schema(description = "上一港")
    private String lastPortCode;

    @Schema(description = "上一港名称")
    private String lastPortName;

    @Schema(description = "上一港国家英文缩写")
    private String lastPortCountryCode;

    @Schema(description = "下一港")
    private String nextPortCode;

    @Schema(description = "下一港名称")
    private String nextPortName;

    @Schema(description = "进口航次")
    private String imVoyage;

    @Schema(description = "出口航次")
    private String exVoyage;

    // ----------------------------- 航次信息 ------------- end -------------

    // ----------------------------- shipManifest ------------- start -------------
    @Schema(description = "装货港代码")
    private String polCode;

    @Schema(description = "装货港名称")
    private String polName;

    @Schema(description = "卸货港代码")
    private String podCode;

    @Schema(description = "卸货港名称")
    private String podName;

    @Schema(description = "目的港代码")
    private String finalPodCode;

    @Schema(description = "目的港名称")
    private String finalPodName;
    // ----------------------------- shipManifest ------------- end -------------

    // ----------------------------- common part ------------- start -------------

    @Schema(description = "装船作业计划总箱子")
    private int loadPlanTotal;

    @Schema(description = "装船作业已完成总箱子")
    private int loadCompletedTotal;

    @Schema(description = "卸船作业计划总箱子")
    private int unloadPlanTotal;

    @Schema(description = "卸船作业已完成总箱子")
    private int unloadCompletedTotal;

    @Schema(description = "船舶状态")
    private String shipStatus;

    // ----------------------------- common part ------------- end -------------
}
